<!DOCTYPE html>
<html class="login-bg">
<head>
    <title>星源后台管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <!-- bootstrap -->
    <link href="css/bootstrap/bootstrap.css" rel="stylesheet"/>
    <link href="css/bootstrap/bootstrap-responsive.css" rel="stylesheet"/>
    <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="css/layout.css"/>
    <link rel="stylesheet" type="text/css" href="css/elements.css"/>
    <link rel="stylesheet" type="text/css" href="css/icons.css"/>
    <link rel="stylesheet" type="text/css" href="css/lib/font-awesome.css"/>
    <link rel="stylesheet" href="css/compiled/signin.css?dt=20180301" type="text/css" media="screen"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<!-- background switcher
<div class="bg-switch visible-desktop">
    <div class="bgs">
        <a href="#" data-img="landscape.jpg" class="bg active">
            <img src="img/bgs/landscape.jpg"/>
        </a>
        <a href="#" data-img="blueish.jpg" class="bg">
            <img src="img/bgs/blueish.jpg"/>
        </a>
        <a href="#" data-img="7.jpg" class="bg">
            <img src="img/bgs/7.jpg"/>
        </a>
        <a href="#" data-img="8.jpg" class="bg">
            <img src="img/bgs/8.jpg"/>
        </a>
        <a href="#" data-img="9.jpg" class="bg">
            <img src="img/bgs/9.jpg"/>
        </a>
        <a href="#" data-img="10.jpg" class="bg">
            <img src="img/bgs/10.jpg"/>
        </a>
        <a href="#" data-img="11.jpg" class="bg">
            <img src="img/bgs/11.jpg"/>
        </a>
    </div>
</div>
-->

<div class="row-fluid login-wrapper">
    <a href="index.html">
        <!--<img class="logo" src="img/logo-white.png"/>-->
    </a>

    <div class="span4 box">
        <div class="content-wrap">
            <h6>维修管理系统</h6>
            <form id="loginForm">
                <input class="span12" type="text" placeholder="用户名" name="username" required/>
                <input class="span12" type="password" placeholder="密码" name="password" required/>
                <button class="btn-glow primary login" id="login">登录</button>
            </form>
        </div>
    </div>
</div>

<!-- scripts -->
<script src="/js/jquery-2.0.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/theme.js"></script>
<script src="/js/layer.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/localization/messages_zh.min.js"></script>
<!-- pre load bg imgs -->
<script type="text/javascript">
    $(function () {
        // bg switcher
        var $btns = $(".bg-switch .bg");
        $btns.click(function (e) {
            e.preventDefault();
            $btns.removeClass("active");
            $(this).addClass("active");
            var bg = $(this).data("img");

            $("html").css("background-image", "url('img/bgs/" + bg + "')");
        });
    });

    $('#login').on('click', function () {
        var subfrom = $('#loginForm');
        subfrom.validate({
            submitHandler: function (form) {
                var param = $(form).serialize();
                $.post('login.do', param, function (result) {
                    if (result.success) {
                        window.location.href = "home.do";
                    } else {
                        layer.msg(result.message, {icon: 5});
                    }
                }, 'json');

            }
        });
    });
</script>
</body>
</html>